$(function() {
    init_vue();
});

function init_vue() {
    var vue = new Vue({
        el : "#myapp",
        data : {
            startRow : 0,
            endRow : 0,
            total : 0,
            firstPage : 0,
            lastPage : 0,
            pageNum : 1,
            pageSize : 15,
            list : null,
            navigatepageNums : null,
            sum_settlement_money:0,
            sum_total_fee:0,
            sum_cash_profit_loss:0,
            sum_cash_income:0,
        },
        events : {
        },
        methods : {
            init : function() {
                close_layuiLayerLoad();
                this.getData();
            },
            showPage : function(page) {
                // alert(page);
                this.pageNum = page;
                this.getData();
            },
            getData : function() {
                showLoad();
                var t = this;
                postMsg(root+"/organizationSettlement/tolist", {
                    page_num : t.pageNum,
                    page_size : t.pageSize
                }, function(i) {
                    t.list = null;
                    t.list = i.data.list;
                    t.startRow = i.data.startRow;
                    t.endRow = i.data.endRow;
                    t.total = i.data.total;
                    t.firstPage = i.data.firstPage;
                    t.lastPage = i.data.lastPage;
                    t.navigatepageNums = i.data.navigatepageNums;

                    t.sum_settlement_money = i.sum_settlement_money;
                    t.sum_total_fee = i.sum_total_fee;
                    t.sum_cash_profit_loss = i.sum_cash_profit_loss;
                    t.sum_cash_income = i.sum_cash_income;
                    hideLoad();
                });
            }
        }
    });
    vue.init();
}